<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script>
			window.onload = function() {
				var seperator1 = ":";
				var seperator2 = "-";
				var date = new Date();
				var day = date.getDate();
				var month = date.getMonth()+1;
				var year = date.getFullYear();
				var seconds = date.getSeconds();
				var minutes = date.getMinutes();
				
				if(month > 0 && month < 10){
					month  = "0" + month;
				}
				if(day > 0 && day < 10){
					day = "0" + day;
				}
				if(minutes < 10){
					minutes = "0" + minutes;
				}
				if(seconds < 10){
					seconds = "0" + seconds;
					
				}
//				alert(minutes);
				var hours = date.getHours();
				alert(hours);
//				alert(seconds);
//				alert(year);
//				alert(month);
				var timeStr = year + seperator2 + month + seperator2 + day + "  " + hours + seperator1 + minutes + seperator1 + seconds;
				alert(timeStr);
				
			}
		</script>
	</head>

	<body>

	</body>

</html>